# pragma once
# include <stdint.h>

struct AVCodecContext;
struct AVCodecParserContext;
struct AVCodec;
struct AVPacket;
struct AVFrame;

struct EncoderContext;
class _declspec(dllexport) VideoDecoder {
public:
	static void parse(char* _data, size_t& _size);
	VideoDecoder(uint8_t* _video_encode_ctx);

	void onData(const uint8_t* _data, int _size, uint8_t* _buffer, int _buffer_size);

	~VideoDecoder();

private:
	AVCodec* m_video_decode_codec = nullptr;
	AVCodecContext* m_video_decode_codec_ctx = nullptr;
	AVCodecParserContext* m_video_parser_ctx = nullptr;
	AVPacket* m_video_decode_packet = nullptr;
	AVFrame* m_video_decode_frame = nullptr;
};
